package com.helmlabs.grouper.finance.services;

public class FinanceServiceFactory {
	
	private static BillableService billableService;
	private static MembershipDueService membershipDueService;
	
	public static BillableService getBillableService(){
		if (billableService==null){
			try {
				Class clazz = Class.forName("com.helmlabs.grouper.finance.services.BillableServiceImpl");
				billableService = (BillableService)clazz.newInstance();
			} catch (Exception ex){
				ex.printStackTrace();
			}
		}
		return billableService;
	}

	public static MembershipDueService getMembershipDueService(){
		if (membershipDueService==null){
			try {
				Class clazz = Class.forName("com.helmlabs.grouper.finance.services.MembershipDueServiceImpl");
				membershipDueService = (MembershipDueService)clazz.newInstance();
			} catch (Exception ex){
				ex.printStackTrace();
			}
		}
		return membershipDueService;
	}

}
